package crm;
/**
 * help 类，用来存放不同的help查看的内容输出
 * @author ZHUAN4
 *
 */
public class Help {
	
	public static void helpHandle(String[] infos){

		/**
		 * TEST infos[]
		 */
//		System.out.println("infos length:"+infos.length);
//		for(int i=0;i<infos.length;i++)
//		{
//			System.out.println(infos[i]);
//		}
		if(infos.length==1)
		{
			helpAll();
		}
		else{
			switch(infos[1]){
			case "" : helpAll();    		 break;
			case "L": help();helpList();     break;
			case "A": help(); helpAdd();     break;
			case "D": help(); helpDelete();  break;
			case "U": help(); helpUpdate();  break;
			case "O": help(); helpOrder();   break;
			case "Q": help(); helpQuit();    break;
			case "H": help(); helpHelp();    break;
			default :  helpAll();    		 break;
			}
		}
		
		
	}
	
	public static void helpAll(){
		help();
		helpList();
		helpAdd();
		helpDelete();
		helpUpdate();
		helpOrder();
		helpQuit();
		helpHelp();
	}

	/**
	 * 每次使用help的抬头输出信息
	 */
	public static void help(){
		System.out.println("HELP");
		System.out.println("Customer Reationship Management!  version 1.0 ");
		System.out.println("designed by Anger Zhu  designed time 7/7/2017 ");
		System.out.println();
	}
	
	public static void helpList(){
		System.out.println("L [name]·················"+"List all customer`s information or list only by name");
	}
	
	public static void helpAdd(){
		System.out.println("A name:xxxx,sex:xxx······"+"Add a cuntomer`s information input by this");
	}
	
	public static void helpDelete(){
		System.out.println("D id·····················"+"Delete some customer`s information by his ID");
	}
	
	public static void helpUpdate(){
		System.out.println("D ID name:xxxx,sex:xxx···"+"Update some customer`s information by his ID");
	}
	
	public static void helpOrder(){
		System.out.println("O id/name················"+"Update some customer`s information by his ID");
	}
	
	public static void helpQuit(){
		System.out.println("O ························"+"Quit the Customer Reationship Management!");
	}
	
	private static void helpHelp() {
		// TODO Auto-generated method stub
		System.out.println("H [L][A][D][U][O][H][Q]···"+"Help fuction,choose the word to get you want specificly");
	}

}
